package cn.com.godliu.oauth2.responses;

import lombok.Data;

import java.io.Serializable;
import java.util.Map;

@Data
public class ResultObj implements Serializable {
    int code;
    String msg;
    Object object;

    public ResultObj() {
    }

    public ResultObj(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ResultObj(int code, String msg, Map<String, String> params) {
        this.code = code;
        this.msg = msg;
        this.object = params;
    }

    public static ResultObj ResultObj_OK() {
        return new ResultObj(1, "成功");
    }

    public static ResultObj ResultObj_FAIL(int code, String msg) {
        return new ResultObj(code, msg);
    }
}
